// const playAction = process.argv[process.argv.length - 1];

let gams = require('./lib.js');


let count = 0
process.stdin.on('data', e => {
    const playAction = e.toString().trim();
    const result = gams(playAction);

    console.log(result)
    if (result == -1) {
        count++;
    }
    if (count === 3) {
        console.log('你太厉害了，我不玩了');
        process.exit();
    }
})